DISCUSSION
The
ATSUCreateTextLayoutWithTextHandle function creates a text layout object with style runs, a handle to associated text, and default text layout attribute values. The default text layout attribute values are described in
Table C-2. You can create a text layout object that contains a pointer to associated text by calling the function
ATSUCreateTextLayoutWithTextHandle.
Most functions that operate on text layout objects perform these operations on the range of text that you specify in the
iTextOffset and
iTextLength parameters. Typically, this is a subrange of the entire text buffer. If this range is shorter than the entire text buffer, the text layout object will scan the remaining text to get the full context for bidirectional processing and other information about the text.
You are responsible for updating the memory location of the text associated with a text layout object whenever the user inserts, deletes, or moves text. To determine the current text memory location, call the function
ATSUGetTextLocation.